package com.haiya.proxy.basic;

public class Proxy implements Subject {
    RealSubject realSubject = new RealSubject();
    @Override
    public void request() {
        preRequest();
        realSubject.request();
        postRequest();
    }

    public void preRequest() {
        System.out.println("代理的前置方法~~~");
    }

    public void postRequest() {
        System.out.println("代理的后置方法~~~");
    }
}
